V2EX  ›  英汉词典

Runtime Check

Definition / 定义

runtime check运行时检查;指程序在运行期间对条件进行验证(如数组越界、空指针、类型/断言、溢出等),以便及时报错或采取保护措施。常与“编译时检查(compile-time check)”相对。

Pronunciation / 发音

/ˈrʌn.taɪm tʃek/

Examples / 例句

The language performs a runtime check for array bounds.
该语言会对数组边界进行运行时检查。

To improve reliability, we added a runtime check that throws an error when the input is missing or malformed.
为了提高可靠性,我们添加了运行时检查:当输入缺失或格式错误时就抛出错误。

Etymology / 词源

runtimerun(运行)+ time(时间)组成,表示“程序运行的时期/阶段”;check 源自古法语 eschequier(原指“在棋盘/算筹盘上核对账目”),后引申为“核对、检查”。组合起来即“在运行阶段进行的检查”。

Related Words / 相关词

Literary Works / 文学作品

  • The C Programming Language(Kernighan & Ritchie):讨论错误处理与防御性编程时常涉及运行时检查的思想。
  • Structure and Interpretation of Computer Programs(Abelson & Sussman):在解释器、过程与错误处理相关内容中可见与运行时检查相近的概念。
  • Clean Code(Robert C. Martin):在“保证代码健壮性/防御式编程”的语境下常提到运行时验证与错误处理。
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2857 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 05:21 · PVG 13:21 · LAX 21:21 · JFK 00:21
♥ Do have faith in what you're doing.